/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_kernel.htm
 *
 * Zhiqim Kernel is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.kernel.json;

/**
 * Json字符串解析时的标志位，共2两种：
 * 1、有符号字符串
 *    1.1、支持转义符
 *    1.2、符号值
 * 2、无符号字符串
 *    2.1、是否有空格
 *    2.2、空格后是否有字符
 * 3、定义一个对象或数组的层级数
 *
 * @version v1.0.0 @author zouzhigang 2020-3-29 新建与整理
 */
public class JsonFlag
{
    private boolean isString;
    private boolean isEscape;
    private char quotation;
    
    private boolean isStringNoQuotation;
    private boolean hasSpace;
    
    private int num;
    private int onum;
    
    public boolean isString()
    {
        return isString;
    }
    public void setString(boolean isString)
    {
        this.isString = isString;
    }
    public boolean isEscape()
    {
        return isEscape;
    }
    public void setEscape(boolean isEscape)
    {
        this.isEscape = isEscape;
    }
    public char getQuotation()
    {
        return quotation;
    }
    public void setQuotation(char quotation)
    {
        this.quotation = quotation;
    }
    public boolean isStringNoQuotation()
    {
        return isStringNoQuotation;
    }
    public void setStringNoQuotation(boolean isStringNoQuotation)
    {
        this.isStringNoQuotation = isStringNoQuotation;
    }
    public boolean hasSpace()
    {
        return hasSpace;
    }
    public void setSpace(boolean hasSpace)
    {
        this.hasSpace = hasSpace;
    }
    public int num()
    {
        return num;
    }
    public void add()
    {
        num++;
    }
    public void sub()
    {
        num--;
    }
    public int onum()
    {
        return onum;
    }
    public void oadd()
    {
        onum++;
    }
    public void osub()
    {
        onum--;
    }
}
